import {IRouter} from "../typing/router";
import {lazy, ReactElement} from "react";
const Home = lazy(()=>import("../pages/home"));
const Courses = lazy(()=>import("../pages/courses"));
const CourseInfo  = lazy(()=>import("../pages/courseinfo"));

export const Router:IRouter[] = [
    {
        id : 1,
        key : "home",
        title :  "home",
        path : "/home",
        component : <Home/>
    },
    {
        id : 2,
        key : "course",
        title :  "course",
        path : "/course",
        children : [
            {
                id : 3,
                key : "course list",
                title :  "course list",
                path : "/course/list",
                component : <Courses/>
            },
            {
                id : 4,
                key : "course info",
                title :  "course info",
                path : "/course/:courseId",
                component : <CourseInfo/>
            }
        ]
    }
]
